Development and implementation of analyzer based control system and algorithm

ABSTRACT

A method of correcting measurements of a chemical sensor used in an industrial facility. The method involves correcting for errors known to occur in the steady state and the dynamic state for specifically recognized situations. This method allows for correcting errors that occur due to deadtime, false zero measurements, and non-linear disturbances. The method combines automated measurement techniques and human know how to progressively learn and refine the accuracy of the corrections.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/284,770, filed Oct. 4, 2016, issued on Dec. 5, 2017, as U.S. Pat. No.9,834,732, itself a continuation of U.S. patent application Ser. No.13/557,761, filed Jul. 25, 2012, issued on Oct. 4, 2016, as U.S. Pat.No. 9,458,388, which itself is related to U.S. patent application Ser.No. 12/263,904, filed Nov. 3, 2008, the disclosures of which areincorporated by reference herein in their entirely for all purposes.

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

Not Applicable.

BACKGROUND OF THE INVENTION

This invention relates generally to an analyzer based control system andalgorithm for the use in a chemical process system. As described forexample in U.S. Pat. Nos. 5,503,006, 5,425,267, 5,965,785, 5,326,482,4,335,072, US Published Patent Applications 2010/0108566 and2012/0053861 A1, UK Patent 1,198,734, and International PatentApplications 2008/005058, 2004/044266, and 03/006581, chemical andindustrial facilities utilize a variety of complex equipment, which areoften subject to harsh chemical and physical conditions. As such, anumber of technologies have been developed to monitor the condition,efficiency, and expected lifespan of the equipment. Such technologiesinclude historian systems, which collect and archive data from varioussources within the chemical plant. U.S. patent application Ser. No.12/899,250 describes a number of methods of utilizing historian andother data.

Monitoring equipment typically involves a system in which a variety ofprocess variables are measured and recorded. One such system isdescribed in US Published Patent Application 2009/0149981 A1. Suchsystems however often produce massive amounts of data of which only asmall portion of which is usefully tracked to detect abnormal conditionsand the information gleaned from those systems is of limited practicaluse.

In the context of corrosion prevention, three of the most useful datasets for a monitor to measure are pH, metal (especially iron) ionconcentrations, and chloride ion concentrations. Ideally the monitoreddata is as close to real time as possible so remediation techniques forthe causes of extreme concentrations can be applied before the causeseffect corrosion or otherwise damage the facility. Unfortunately currentmonitoring technologies provide a large volume of false data so realtime monitoring is usually difficult if not impossible. Moreover thefalse data can lead to the wasting of expensive remedial chemistrieswhen their addition was not needed. As a result a truly automatedremedial chemical feed system is not feasible and a human operator istypically required to prevent the addition of remediating chemicals inthe face of a “false alarm” thereby increasing operation costs.

Thus there is a clear need for and utility in an improved method ofmonitoring the conditions within a chemical plant. The art described inthis section is not intended to constitute an admission that any patent,publication or other information referred to herein is “prior art” withrespect to this invention, unless specifically designated as such. Inaddition, this section should not be construed to mean that a search hasbeen made or that no other pertinent information as defined in 37 C.F.R.§ 1.56(a) exists.

BRIEF SUMMARY OF THE INVENTION

At least one embodiment of the invention is directed towards a method ofcorrecting an error in the measurement of a process variable taken by asensor in a chemical process system. The system is characterized byproperties which cause at least some of the measurements to beerroneous. The method comprises the steps of: 1) identifying thecomponent of the error caused by dynamic state factors, this componentof the error being determined by at least once obtaining a sensormeasurement in the system and noting how that measurement deviates froman objectively correct measurement of the process variable by varyingamounts relative to time, 2) identifying the steady state factorcomponent of the error, this component of the error being determined byat least once obtaining a sensor measurements and noting that themeasurement deviates from the objectively correct measurement of theprocess variable by a fixed amount relative to time, 3) identifying thecomponent of the error caused by additional factors, and 4) altering themeasurement to remove the errors caused by steady state factors, dynamicstate factors, and unknown factors.

The sensor may be in informational communication with an analyzer andthe analyzer may be in informational communication with a controller.The sensor may be constructed and arranged to obtain a raw measurementof the process variable. The analyzer may correct the error in thesensor's measurement. The controller may take the corrected measurement.If the corrected measurement is outside of a pre-determined range ofacceptable values, it may enact a remedial measure to change themeasured value to a value within the acceptable range. The remedialmeasure may be enacted before the steady state value of the measurementis detected by the sensor.

The process variable may be a measurement of one item selected from thelist consisting of: oxidation-reduction potential, pH, levels of certainchemicals or ions (e.g., determined empirically, automatically,fluorescently, electrochemically, colorimetrically, measured directly,calculated), temperature, pressure, process stream flow rate, dissolvedsolids and suspended solids.

There may be at least three sensors and each of the three sensors maypass on a raw measurement to the analyzer. The analyzer may use theaverage of those raw measurements as the input in its calculations if atleast one of the raw measurements fits within a pre-determined setpointexpected for the specific conditions under which measurement was taken,the analyzer a historically expected value as the input in itscalculations if none of the raw measurements fit within a pre-determinedsetpoint expected for the specific conditions under which measurementwas taken,

The process variable may be iron concentration. The method may furthercomprise the steps of: disregarding all sensor readings that indicatezero iron concentration, and adjusting the measured iron concentrationsusing regression analysis over a 1 week time period. The remedialmeasure may involve adding a chemical whose effect is non-linear innature. The analyzer may correct for the non-linear effects of theremedial chemical in its corrections. The remedial measure may involveadding a chemical subject to the constraints of deadtime and theanalyzer corrects for those effects in its measurements. The processsystem may be one item selected from the list consisting of: a chemicalplant, a refinery, an oil refinery, a food processing facility, amanufacturing plant, a chemical plant, a distillation column, a waterfiltration plant, a factory, a waste processing facility, a watertreatment facility, and any combination thereof.

BRIEF DESCRIPTION OF THE DRAWINGS

A detailed description of the invention is hereafter described withspecific reference being made to the drawings in which:

FIG. 1 is a graph which illustrates a method of correcting a measuredvalue of a process variable.

FIG. 2 is a graph which illustrates a method of correcting a measuredvalue of a process variable.

FIG. 3 is a graph illustrating the difficulty in calculating thecorrosion rate of a process system.

FIG. 4 is a graph which illustrates a method of correcting a measuredvalue of corrosion rate.

FIG. 5 is an illustration of sources of data used by the analyzer.

FIG. 6 is an illustration of a dashboard containing analyzer output.

DETAILED DESCRIPTION OF THE INVENTION

The following definitions are provided to determine how terms used inthis application, and in particular how the claims, are to be construed.The organization of the definitions is for convenience only and is notintended to limit any of the definitions to any particular category.

“Chemical process system” means one or more processes for converting rawmaterials into products which includes but is not limited to industrialprocesses which utilize one or more of the following pieces ofequipment: chemical plant, refinery, furnace, cracker, overhead column,stripper, filter, distiller, boiler, reaction vessel, and heatexchanger, and the like.

“Dynamic State” means a condition of a measured process variable inwhich the observed measurement changes over at least a portion of adiscrete period of time during which the condition is measured while infact the actual magnitude of the process variable is not changing.

“Steady state” means a condition of a measured process variable in whichthe observed measurement remains unchanging over a discrete period oftime during which the condition is measured while in fact the actualmagnitude of the process variable is not changing.

In the event that the above definitions or a description statedelsewhere in this application is inconsistent with a meaning (explicitor implicit) which is commonly used, in a dictionary, or stated in asource incorporated by reference into this application, the applicationand the claim terms in particular are understood to be construedaccording to the definition or description in this application, and notaccording to the common definition, dictionary definition, or thedefinition that was incorporated by reference. In light of the above, inthe event that a term can only be understood if it is construed by adictionary, if the term is defined by the Kirk-Othmer Encyclopedia ofChemical Technology, 5th Edition, (2005), (Published by Wiley, John &Sons, Inc.) this definition shall control how the term is to be definedin the claims.

Automation technology plays a significant role in improving andmaintaining efficient process operation. It influences the strategic andoperational goals of enterprises, their economic results, thedevelopment and quality of products, continuity of production, andcompetitiveness in the marketplace. These strategies should include (1)Improvements of unit operation and (2) Optimizing proper selectedchemicals. The key to controlling the corrosion rate is to analyze thecorrosion performance and drive the decisive knowledge based onoperating data and analyzer measurements. Crude Unit Automation (CUA)system is designed to monitor and analyze the system corrosion andfeedback control the chemicals using automation technologies. Theimplementation of these strategies resulted in lower corrosion risk andcontinued improvement of the run length of the overhead heat exchangers.

In at least one embodiment of the invention, the control system in usein the process system comprises two elements: (1) at least one sensorand (2) at least one analyzer. In at least one embodiment of theinvention, the control system comprises three elements: (1) at least onesensor, (2) at least one analyzer, and (3) at least one controller. Thesensor(s) is constructed and arranged to measure at least one processvariable within at least one portion of the system. The analyzerreceives the measurement taken by the sensor and converts it intoinformation which can be output. The controller receives the output andcan cause some operation to occur in response to the output.

In at least one embodiment the response includes adding a chemical.Added chemicals may include neutralizer, filmer, caustic, and inhibitorsand so on and are used to control corrosion process variables. Theanalyzer provides on-line measurements of process variables (especiallypH, [Cl] and [Fe]). The analyzer provides output which is used tomonitor, analyze and manage the whole system.

In at least one embodiment some or all of the information is displayedon a dashboard. The dashboard can also display how the system manageshistorian database data, reports, alarms, and make readily available theuser's selected strategy for real time control and optimization of thecrude unit system.

In at least one embodiment the system is a closed loop which utilizespreliminary analysis of historian and archived data, updates from theanalyzer and other diagnostics (such as personal observations anddiscussions with operating staff) to then generate responses and furtheranalysis of the crude unit's operations.

In at least one embodiment the use of inhibitors is to prevent or toreduce general corrosion, and it plays an important role in the controlof corrosion for those areas in which general corrosion is the problem.The objective of the control system is how to prevent/reduce corrosionin crude unit overhead by controlling the inhibitors. As one of the maincomponents of a crude unit process, corrosion control plays a vital rolein maintaining system integrity. This invention provides a way tooptimize the corrosion control component of the crude unit throughoptimizing one or more system parameters in a process stream of thecrude unit. This optimization includes measuring properties associatedwith those parameters in the process stream.

In at least one embodiment the analyzer is designed to reduce corrosionof refinery processing equipment and subsequent fouling due todeposition of corrosion byproducts. A typical corrosion control programincludes components such as a neutralizing amine, a filming inhibitor, acaustic solution, etc. Such corrosion control chemicals aretraditionally injected into the system based upon measurements derivedfrom grab samples and analyzed in the lab or some flow indication on theunit. This invention provides an automated method of adjusting chemicalinjection into the system.

In at least one embodiment, the method of the invention includes acontroller operable to receive and process information and provideinstructions to various components (e.g., chemical injection pumps). Theterm “controller” refers to a manual operator or an electronic devicehaving components such as a processor, memory device, digital storagemedium, cathode ray tube, liquid crystal display, plasma display, touchscreen, or other monitor, and/or other components. The controller ispreferably operable for integration with one or moreapplication-specific integrated circuits, programs, computer-executableinstructions or algorithms, one or more hard-wired devices, wirelessdevices, and/or one or more mechanical devices. Moreover, the controlleris operable to integrate the feedback, feed-forward, or predictiveloop(s) of the invention. Some or all of the controller system functionsmay be at a central location, such as a network server, forcommunication over a local area network, wide area network, wirelessnetwork, internet connection, microwave link, infrared link, and thelike. In addition, other components such as a signal conditioner orsystem monitor may be included to facilitate signal transmission andsignal-processing algorithms.

The controller may include hierarchy logic to prioritize any measured orpredicted properties associated with system parameters. For example, thecontroller may be programmed to prioritize system pH over chloride ionconcentration or vice versa. It should be appreciated that the object ofsuch hierarchy logic is to allow improved control over the systemparameters and to avoid circular control loops.

In at least one embodiment, the method includes an automated controller.In another embodiment, the controller is manual or semi-manual. Forexample, where the crude refining process includes one or more datasetsreceived from a various sensors in the system, the controller may eitherautomatically determine which data points/datasets to further process oran operator may partially or fully make such a determination. A datasetmay include process variables or system parameters such asoxidation-reduction potential, pH, levels of certain chemicals or ions(e.g., determined empirically, automatically, fluorescently,electrochemically, colorimetrically, measured directly, calculated),temperature, pressure, process stream flow rate, dissolved or suspendedsolids, etc. Such system parameters or process variables are typicallymeasured with any type of suitable data capturing equipment, such as pHsensors, ion analyzers, temperature sensors, thermocouples, pressuresensors, corrosion probes, and/or any other suitable device or method.Data capturing equipment is preferably in communication with thecontroller and, according to alternative embodiments, may have advancedfunctions (including any part of the control algorithms describedherein) imparted by the controller.

Data transmission of measured parameters or signals to chemical pumps,alarms, or other system components is accomplished using any suitabledevice, such as a wired or wireless network, cable, digital subscriberline, internet, etc. Any suitable interface standard(s), such as anethernet interface, wireless interface (e.g., IEEE 802.11a/b/g/x,802.16, Bluetooth, optical, infrared, radiofrequency, etc.), universalserial bus, telephone network, the like, and combinations of suchinterfaces/connections may be used. As used herein, the term “network”encompasses all of these data transmission methods. Any of the describeddevices (e.g., plant archiving system, data analysis station, datacapture device, process station, etc.) may be connected to one anotherusing the above-described or other suitable interface or connection.

In at least one embodiment, system parameter information is receivedfrom the system and archived. In another embodiment, system parameterinformation is processed according to a timetable or schedule. In afurther embodiment, system parameter information is immediatelyprocessed in real-time/substantially real-time. Such real-time receptionmay include, for example, “streaming data” over a computer network.

In at least one embodiment two or more samples are taken at differentlocations in the system. For example one could be at the dew point andone at the boot accumulator. The measurement differences at these twosample points require a corresponding algorithm to adjust chemicalinjection. The term “dew point” refers to the point of initialcondensation of steam to water or the temperature at which a phase ofliquid water separates from the water vapors and liquid hydrocarbons andbegins to form liquid water as the vapors cool. Though possible to usethe accumulator water boot to measure pH and chloride ion level, a levelof accuracy is usually sacrificed because data is diluted or masked bythe full volume of steam and weak acids and bases that have condenseddownstream of the water dew point.

Likewise, it is possible to measure iron (or other metals, such ascopper, molybdenum, nickel, zinc) ion concentration from the dew pointwater. In at least one embodiment the metal ion concentration ismeasured at the accumulator water boot because these ions indicatecorrosion has taken place and metal has been removed from an internalcomponent in the system upstream of the sample point.

It should be appreciated that any suitable method may be used forobtaining the dew point water sample. For example, devices for obtainingthe dew point water sample are disclosed in U.S. Pat. No. 4,335,072,titled “Overhead Corrosion Simulator” and U.S. Pat. No. 5,425,267,titled “Corrosion Simulator and Method for Simulating Corrosion Activityof a Process Stream,” each of which is incorporated herein by referencein its entirety.

In at least one embodiment, different fluid or system parameters orprocess variables or other constituents present in the system could bemeasured and/or analyzed including but not limited to pH; chloride ion;other strong and weak acids, such as sulfuric, sulfurous, thiosulfurous,carbon dioxide, hydrogen sulfide; organic acids; ammonia; variousamines; and liquid or solid deposits and the like. Various methods oftaking measurements are contemplated and the invention is not limited toone particular method. Representative methods include, but are notlimited to those disclosed in U.S. Pat. Nos. 5,326,482, 5,324,665, and5,302,253.

In response to the measurements taken at various locations in the systemremedial chemistry can be added to the system to respond to the measuredreadings. Such remedial chemistries include but are not limited toneutralizers, filming inhibitors (sometimes referred to herein as“filmers”), and caustic agents. These points are labeled “Neutralizerbased on acid or pH,” “Filmer based on iron,” and “Caustic based onchloride.” It should be appreciated that such chemicals may be added atany suitable location in the system. In at least one embodiment,introduction of such chemicals into the system are adjustedcontinuously. In other embodiments, chemical introduction is adjustedintermittently or in relation to a schedule as determined for eachindividual system.

Neutralizer(s), caustic agent(s), and filming inhibitor(s) may beintroduced to the system using any suitable type of chemical feed pump.Most commonly, positive displacement injection pumps are used poweredeither electrically or pneumatically. Continuous flow injection pumpsare sometimes used to ensure specialty chemicals are adequately andaccurately injected into the rapidly moving process stream. Though anysuitable pump or delivery system may be used, exemplary pumps andpumping methods include those disclosed in U.S. Pat. No. 5,066,199,titled “Method for Injecting Treatment Chemicals Using a Constant FlowPositive Displacement Pumping Apparatus” and U.S. Pat. No. 5,195,879,titled “Improved Method for Injecting Treatment Chemicals Using aConstant Flow Positive Displacement Pumping Apparatus,” eachincorporated herein by reference in its entirety.

Representative neutralizers include but are not limited to3-methoxypropylamine (MOPA) (CAS #5332-73-0), monoethanolamine (MEA)(CAS #141-43-5), N,N-dimethylaminoethanol (DMEA) (CAS #108-01-0), andmethoxyisopropylamine (MIOPA) (CAS #37143-54-7).

As a caustic agent, a dilute solution of sodium hydroxide is typicallyprepared in a 5 to 10% concentration (7.5 to 14° Baume) for ease ofhandling and to enhance distribution once injected into the crude oil,or desalter wash water, for example. Concentration may be adjustedaccording to ambient conditions, such as for freeze point in coldclimates.

Filming inhibitors or filmers used in conjunction with this invention ina crude unit corrosion control program are typically oil soluble blendsof amides and imidazolines. These compounds offer good corrosion controlwith minimal effects on the ability of the hydrocarbons in the system tocarry water.

It should be appreciated that a suitable pH control or optimal rangeshould be determined for each individual system. The optimum range forone system may vary considerably from that for another system. It iswithin the concept of the invention to cover any possible optimum pHrange.

In different embodiments, changes in the neutralizer pump are limited infrequency. Preferably, adjustment limits are set at a maximum of 1 per15 min and sequential adjustments in the same direction should notexceed 8. For example, after 8 total adjustments or a change of 50% or100%, the pump could be suspended for an amount of time (e.g., 2 or 4hours) and alarm could be triggered. If such a situation is encountered,it is advantageous to trigger an alarm to alert an operator. Otherlimits, such as maximum pump output may also be implemented. It shouldbe appreciated that it is within the scope of the invention to cause anynumber of adjustments in any direction without limitation. Such limitsare applied as determined by the operator.

It should be appreciated that a suitable or optimal chloride ionconcentration range should be determined for each individual system. Theoptimum range for one system may vary considerably from that for anothersystem. It is within the concept of the invention to cover any possibleoptimum chloride ion concentration range.

In at least one embodiment other metallurgy is used so such as monel,titanium, brass, etc. may be used in some systems. In these cases,rather than an iron ion concentration signal, the appropriate metal ion(e.g., copper, nickel, zinc, etc.) concentration signal would bedetected and analyzed.

Metal ions commonly exist in two or more oxidation states. For example,iron exists in Fe²⁺ and Fe³⁺ as well being present in soluble states(ionic and fine particulate), insoluble states (i.e., filterable), etc.Analysis and control of metal ions includes measurement or prediction ofany combination (or all) of such permutations present in the system.

Although the corrosion probes (e.g., electrical resistance corrosionprobes, linear polarization probes, and/or any other suitable method fordetermining metal loss) may be placed at any convenient location in thesystem, preferably they are placed in historically reliable locations inthe system. In addition, if, for example, 2 overrides are activated overa 12 hr period, a reliability check is typically initiated to ensurethat the corrosion probes are operating properly. If such a situation isencountered, it is advantageous to trigger an alarm to alert anoperator. Other limits, such as maximum pump output may also beimplemented. It should be appreciated that it is within the scope of theinvention to cause any number of adjustments in any direction withoutlimitation. Such limits are applied as determined by the operator.

In at least one embodiment, if the communication link between theanalyzer and the controller is severed or impaired, the controllercontinues with whatever action it was undertaking prior to losingcommunication. In at least one embodiment, if the communication linkbetween the analyzer and the sensor is severed or impaired thecontroller continues with whatever action it was undertaking prior tolosing communication. In at least one embodiment, if the analyzer outputinduces the controller to enact a response beyond the physicallimitations of the equipment, the controller the best response possible(such as turning on/off one or more pumps, vents, drains, lifts,stators, conveyers, furnaces, heat exchangers . . . etc.) and thecontroller keeps that underperforming responding equipment running atits maximum capacity until the analyzer output warrants a reduction. Inat least one embodiment at least one piece of responding equipment isconstructed and arranged to respond to analyzer output only gradually.In at least one embodiment while the equipment can respond onlygradually, it is constructed and arranged to return to its pre-responsesetting as soon as physically possible. This allows for the negation ofan incorrect response before the response has caused a significanteffect. An example of gradual response is a pump that increases the flowof chemical from 0% of a maximum flow rate to 100% of maximum flow rateover the course of up to 10 minutes even though it can reach 100% withina few seconds.

In at least one embodiment the analyzer utilizes a model method of dataanalysis to correct for inaccuracies that occur in the measurements ofprocess variables. Because corrosion is by definition the result of afinite amount of mass from the plant equipment detaching from thosepieces of equipment, the amount of corrosion measured should be easy tocorrelate with physical damage to components of the system. However dueto large amounts of noise inherent in such facilities the measuredrates, fluctuate widely and are often not accurate. Significantly thenoise often leads to measured corrosion rates greater than the actualmass that has been removed from the equipment. In addition differentforms of crude oil (especially opportunity crude) and inconsistencies intheir composition cause equipment to often function differently duringdifferent production runs. This leads to varying and hard to predictrates of corrosion. Moreover as corrosion changes the very environmentbeing analyzed each production run may make further ambiguous futureanalyses.

In at least one embodiment the analysis takes into account the knowndifference between the steady state measurement and the dynamic statemeasurement taken by the sensor to correct for inaccuracies that occurin the measurements of process variables. As illustrated in FIG. 1, inmany situations a disturbance in the system (such as turning on or off apump, adding or ceasing addition of a chemical, changing pH, [Fe],temperature, pressure, etc. . . . ) causes a short term dynamic statechange in the sensor measurement as well as a longer term steady statechange in the sensor measurement. The analyzer learns to associate thespecific dynamic state changes that occur in response to specificdisturbances with specific sensors and when under those conditions itdetects a similar dynamic measurement, instead of outputting thedetected measurement the analyzer outputs the corrected value that ithas learned is associated with the properties of the detected dynamicstate.

As a result, in at least one embodiment the output of at least onesensor measurement of a process variable obtained by the analyzerundergoes a conversion. That output can be represented by the function:u=f(e,Δe,d)in which u is output of the analyzer measuring a process variable, e isthe error detected in the dynamic state, d is the magnitude of thedisturbance that caused the error, and Δe is the change in the errorover time. The error itself can be calculated using the equation:e=SP−PVin which PV is a process variable, or the actual value that the analyzermeasured for the variable and SP is the setpoint or what the valueshould have been but for the disturbance based noise.

In at least one embodiment the specific parameters of any predictivefunction used to correct for a measured process variable can becalculated through direct observation of the system.

Utilizing the above equations, one of ordinary skill in the art wouldrecognize that based on a Taylor series expansion,

$u = {{f\left( {e,{\Delta\; e},d} \right)} \approx {{f\left( {e^{0},{\Delta\; e^{0}},d^{0}} \right)} + {\frac{\partial f}{\partial e}{_{e = e^{0}}{\left( {e - e^{0}} \right) + \frac{\partial f}{{\partial\Delta}\; e}}}_{{\Delta\; e} = {\Delta\; e^{0}}}\left( {{\Delta\; e} - {\Delta\; e^{0}}} \right)} + {\frac{\partial f}{\partial d}{_{d = d^{0}}{{\left( {d - d^{0}} \right) + \Delta} = {u^{0} + {f(e)} + {f\left( {\Delta\; e} \right)} + {f(d)} + \Delta}}}}}}$where u⁰ denotes steady state controller output; e⁰, Δe⁰, and d⁰ are e,Δe and d. The controller consists of two parts: steady state, u⁰=f(e⁰,Δe⁰, d⁰) and dynamics f(e), f(Δe), f(d). The steady state can beobtained from direct measurements of the system steady state. In atleast one embodiment at steady state at least one of e⁰, Δe⁰, and d⁰ aree, Δe and d is 0.

The dynamic part is approximated by the following nonlinear dynamicmodel:

Δ represents lumped uncertainties and other unmodeled terms. In at leastone embodiment it can be attenuated by control technology because it isbounded.

At steady state, u⁰ is known by human experience, or it is easy to knowby test or simple analysis and modeling. One useful meaning of u⁰ is theresult of the ideal pump output when the controlled variable is at it'starget. Each dynamic part f is a tunable function based on specificprocess, the function is also knowledge based and within a controllimits [u_(min), u_(max)]. In at least one embodiment the function isdesigned according to a proportional format. In at least one embodimentthe function is designed according to a sigmoid format.

In at least one embodiment the system comprises output limits and thevariable limits [PV_(min), PV_(max)] to designate the boundariespermissible by system control. In practice, u_(min)=u⁰−U_(c);u_(max)=u⁰+u_(c); PV_(min)=SP−SP_(c); PV_(max)=SP+SP_(c), where U_(c) isa output scale factor which is a constant tuned on-line, SP_(c) is thevariable scale factor which is a constant tuned on-line.

In addition, the resulting changes in the system due to feedingchemicals needs to be predictable. Precise control of pH and corrosionis quite difficult due to large variations in process dynamics. Onedifficulty arises from the static nonlinear relationship in results ofchemical additions such as titration. Titration is the relationshipbetween pH of a medium and the concentration of acids and bases in thatmedium. The nonlinearity in titration depends on the substances in thesolution and their concentrations. For example the presence of some weakacids or weak bases causes a buffering effect (a resistance toproportional changes in pH despite proportional changes in theconcentrations of acids and bases).

Other chemistries present in the process system may also have non-linearresponses to added chemicals. In addition because of the ebb and flowrate of operations in a process system, there are very long periods ofdeadtime. As previously mentioned u⁰ can be represented by the result ofthe ideal pump output when the controlled variable is at it's target. Inpractice however due to sizes, distances that the chemicals musttraverse, and other physical constraints, the pump is in fact not idealand there is a significant lag between when the instruction is given tofeed a chemical, and when the chemical appears in the system in a dosagesignificant enough to appropriately affect the system. For purposes ofthis application, the time lag between activating a pump and the pumpcausing the proper effect is known as “deadtime.” During deadtime anumber of changing dynamics occur which lead to wildly inaccuratemeasurements of process variables.

In at least one embodiment the analyzer utilizes a combination of humanknowledge and experience to adjust feed rates to take into account thenonlinear properties the controller must address. This makes thecontroller more intelligent and feasible.

The presence of other materials in the process system often affects thenature of various acids further complicating any attempt to predictresulting pH from changing the concentrations. As a result, if graphed,the shape of the expected titration curve becomes quite irregular. In atleast one embodiment, by disregarding noise and error, the analyzer canaccurately model and predict the correct titration curves is requiredfor effective pH control.

As a result, a method of signal processing may need to be utilized tocorrectly measure a process variable. Suitable forms of signalprocessing include but are not limited to DSP algorithms, filtering(including low pass, high pass, adaptive, and moving average filters),smoothing, ARX, Fourier transform, S-plane analysis, Z-plane analysis,Laplace transforms, DWT, wavelet transforms, bilinear transforms, andGoertzel algorithms. In at least one embodiment analysis using dynamicstate error is done prior to the signal processing. In at least oneembodiment analysis using dynamic state error is subsequent to thesignal processing.

Signal processing is of particular benefit with regards to detecting Fe.One particular error involves the trend of iron detection to drop tozero. This reading is obviously erroneous. As a result, if the signalprocessing does not correct for zero concentration of Fe in a systemthat obviously contains Fe due to ongoing or previous corrosion, theanalyzer will correct the iron reading to what its learned experienceindicates it should be and/or to what the reading was immediately beforeit began its drop to zero. In at least one embodiment, if the sensordetects zero iron the analyzer does not pass on the detected iron valueto the controller but instead passes on a value based on what the ironlevel should be based on previous performance under similar conditions.

In at least one embodiment the control system comprises one or moremethods, compositions, and/or apparatuses described in Published USPatent Application 2012/0053861 A1.

In at least one embodiment the control system comprises one or moreredundant sensors detecting the same process variable at substantiallythe same location in the process system. Because much of the noisecausing inaccuracies is random in nature, the errors do not alwaysaffect all the sensors at the same time. As a result under certaincircumstances a minority of sensors may be erroneous and a majority maybe correct. In at least one embodiment if all of the sensors providereadings consistent with pre-determined setpoints based on the specificconditions present, the analyzer returns the average measurement to thecontroller. In at least one embodiment if at least one of the sensorsprovides measurements consistent with the setpoints, the analyzerreturns the average measurement of the consistent measurements to thecontroller. In at least one embodiment if all of the sensors providemeasurements inconsistent with the setpoints, the analyzer rejects allof the measurements and instead passes on to the controller measurementsbased on historical data until at least one sensor again providesconsistent measurements. In at least one embodiment the historical datawill be the average of some or all previous measurements consistent withthe setpoints.

In at least one embodiment, the analyzer's variable sampling period ismuch longer than that of normal transmitters, (in some cases as high as60 minutes). In addition, the controlled variable expectations(setpoints) are normally in a range instead of a single point.

In at least one embodiment remedial chemistry or process chemistry fedby the controller is added according to a feedforward model. Feedforwardcan best be understood by contrasting it to a feedback approach. Infeedback the receipt of information about a past event or conditioninfluences the same event or condition in the present or future. As aresult the chain of cause and effect forms a circuit loop that feedsback into itself.

In a feedforward model the reaction to the information occurs before theactual information is received. This allows for faster reaction tosystem problems, reducing the duration, severity, and consequences ofunwanted conditions. Feedforward can be achieved using the sameobservations that are used to determine the analyzer output function.Specifically because the analyzer changes the output to the correctvalue before the correct value is detected by the sensor (in some caseswhile it is still receiving dynamic state changing information.)Moreover feedforward allows for the elimination of conditions that wouldotherwise persist during the deadtime between the actual existence of anunwanted condition and the delays caused by inaccurate measurements andimperfect pump flow properties. In at least one embodiment thefeedforward strategy addresses an unwanted system condition faster thana feedback system can.

In at least one embodiment the feedforward model is used to analyze thevariable relationship and eliminate the interactions. For example, in acrude oil refinery logic used to determine if corrosion control measuresneeds to be enacted in response to Fe concentration would be governed bya feedforward model reacting to analyzer output according to a functionof (Caustic, Neutralizer). This control algorithm provides wholefunctionalities and capabilities to implement feedforward model. In atleast one embodiment the properties of the feedforward strategy isincluded in the controller algorithm. The format of the controlleralgorithm its data analysis can be designed based on specific propertiesof the system it is used within.

As previously mentioned because corrosion is due to loss of mass inprocess equipment, by definition the detected amounts of corrosionshould equal the lost mass. Because that however is not what the sensorsoften detect, special measures need to be taken by the analyzer tocorrect the detected levels of corrosion. In at least one embodiment thecorrosion rate (CR) is corrected by the analyzer by taking into accountboth on-line detected levels and an analysis of the corrosion rate.

In at least one embodiment this analysis makes use of two definitions ofCR, instant CR and period CR. Both of the two rates reflect differentaspects of corrosion speed. Instant CR is defined as the rate of metalloss change at a specific fixed period of time, e.g. one day or week. Inat least one embodiment a corrosion probe (the sensor) is used to detecta raw value. Due to the noisy signal inherent in such detections, alinear regression or other form of signal processing may be used tocorrect the detected value of Instant CR. Instant CR provides insightinto instantaneous causes of corrosion which is extremely helpful indetermining the effect of changes in the process system conditions.

In at least one embodiment Period CR requires several days or weeks todetermine the general corrosion rate. Period CR is determined byidentifying which linear function best represents the metal loss in suchnoisy environment. A simple linear calculation is based on two points ofbeginning and end, this calculation assumes the metal loss is monopolyincreased function, does not consider the data between the two points.Obviously, this calculation does not reflect real situation under noisysignals, most likely, this calculation is far away from reality. Aproper linear curve is generated by least squares regression, whichminimize the total distances between each point to the linear curve.min Σ(Y−Y _(i))²where Y represents the linear curve we design; Yi denotes real probereading at i point. FIGS. 3 and 4 show compared corrosion rates based ontwo point corrosion reading, two point filtered corrosion reading, andlinear regression. Essentially, the corrosion rate is the slope of thelinear curve, it shows how big discrepancy of the three calculations,and also we can understand which calculation is more reasonable andscientific. As shown in FIG. 3, using a linear analysis of detectedcorrosion rates over the period can result in multiple rates based onwhich form of analysis is used.

As illustrated in FIG. 4, in at least one embodiment the use of thelinear representation of the average regression curve is used toidentify the actual rate of corrosion that occurs in the system.

In at least one embodiment the decision regarding which linearrepresentation to use is constantly updated to best reflect observationsmade of the system.

Referring now to FIG. 5 there is shown a logical flowchart illustratinghow information from various sources is constantly fed to and used bythe analyzer to improve the logic it uses to correct for incorrectreadings. The analyzer utilizes:

(1) On-line and off-line filter design to smooth noisy corrosion probereading and exclude outliers, (2) corrected definitions of corrosionrates (instant running rate, period rate) and their relationship to eachother. This gives different definitions to calculate and compare. (3)On-line (running regression CR) and off-line corrosion rate calculationand monitoring and alarming corrosion rate. (4) Corrosion rateevaluation and analysis, used by the controller, and (5) automaticallygenerated analysis reports.

In at least one embodiment the control system makes use of on-linemeasurements of Process changes in one or more of temperature, pressure,velocity and concentration to detect acceleration in corrosion rate.This can be done by making use of instant CR and period CR.

In at least one embodiment the analysis is according to the followingequations: Instant CR=dy/dt. Therefore:

${{Instant}\mspace{14mu}{CR}} = {\frac{dy}{dt} = {\lim\limits_{{\Delta\; t}->0}\frac{\Delta\; y}{\Delta\; t}}}$Because Period CR can be said to be the rate of metal loss change at afixed period of time, such as Δt or Δy/Δt. However, because of thesignal “noise” that accompanies metal loss y, if a linear regression ofy is first used and then Period CR is calculated as the slope with timeΔt then:

${{Period}\mspace{14mu}{CR}} = \frac{\Delta\; y}{\Delta\; t}$Instant CR and Period CR reflect different aspects of corrosion speeds.In at least one embodiment Period CR is determined over several days orweeks to determine the general corrosion rate; Instant CR isinstantaneous corrosion which is extremely helpful in determining theeffects of process changes on corrosion.In at least one embodiment the relationship between Instant CR andPeriod CR is determined by an integral mean-value theorem. For example:

${{Period}\mspace{14mu}{CR}} = {\frac{\Delta\; y}{\Delta\; t} = {\frac{y_{t\; 2} - y_{t\; 1}}{{t\; 2} - {t\; 1}} = {\frac{\int_{t\; 1}^{t\; 2}{\frac{dy}{dt}{dt}}}{{t\; 2} - {t\; 1}} = {\frac{\frac{dy}{dt}{_{\xi}\left( {{t\; 2} - {t\; 1}} \right)}}{{t\; 2} - {t\; 1}} = {\frac{dy}{dt}_{\xi}}}}}}$In which there exist a point ξ in [t1, t2] where the instant CR will bethe same as the Period CR. This point however will not necessarily bethe mean, median, mode, and/or average of Instant and Period CR.

Although the corrosion process is very complex, under certaincircumstances the corrosion rate can approximate a simple linearfunction of time t, according to the equation: y=at+b

where y is the monopoly metal loss function; t is time, and a and bdenote the slop and bias of the function. Both a and b are alltime-invariant constants.

Under this approximation:

${{Instant}\mspace{14mu}{CR}} = {\frac{\partial y}{\partial t} = {a = {\frac{\Delta\; y}{\Delta\; t} = {\frac{y - y_{0}}{t - t_{0}} = {{Period}\mspace{14mu}{CR}}}}}}$

This illustrates that if and only if the slope and bias a, b areunchanged constants in the period of time Δt then Period CR will beequal to Instant CR.

As shown in FIG. 6, in at least one embodiment the analyzer outputsinformation into a dashboard format that provides a user with a helpfuland easy to understand perspective on the operations of at least aportion of the system. For example the various detected performancevariables can be expressed according to a relative evaluation indicatinghow well or poor the system is doing.

In at least one embodiment the evaluation will be expressed according toat least one of the following categories:

Control Variable Stability

-   -   Variable stability is very critical for process operation. In        crude unit corrosion control system, three critical variables        (pH, Cl, Fe) are the key to maintain the corrosion system        stable. Daily cpk is used and compared.

Chemical Usage

-   -   Neutralizer, Caustic and Filmer are used to control the three        controlled variables, pH, Cl and Fe. One of objectives of this        control design is to maintain the controlled variables while        saving the chemical usages.

Evaluation on Automation System Operation

-   -   The system not only provides the key variable measurement by the        analyzer, but also (1) The system provides whole information,        include pumps, boot water pressures, working temperatures,        inferred chemical flow rates, corrosion . . . (2) Provides        friendly interface, gives us a platform to remotely monitor and        operate the whole system, modify parameters . . . (3) Collects        analyzer alarms, generates/sets all variable operation alarms,        and provides instant cell phone and email alarms, (4) Provides a        platform of on-line and off-line data analysis and translating        information into    -   refined knowledge . . . , this is the spotlight of the        system, (5) The control system on stream time is 100% except        some events happened.

Corrosion Performance Analysis

-   -   On line corrosion rate must be calculated and compared with        other variables. FIG. 7 gives an example of a weekly period        corrosion rate based on two probes. FIG. 8 shows an evaluation        demonstrating that the corrosion rate is strongly correlated to        the critical variables Fe and pH.

In at least one embodiment the process system that the control system inused within contains at least one of a crude unit, de-salter,atmospheric tower, vacuum tower, cooling unit, heating unit, furnace,cracker, and any combination thereof. The control system will optimizeand improve the performance of some, part or all the components of theprocess system. Such improvement will (1) Improve and maintain processstability and reliability. (2) Optimize chemical usages and reduce cost.(3) Improve system robustness, operating flexibility, provide reliableinformation system and friendly low-cost interface. (4) Define,calculate, monitor, control and optimize corrosion rate.

In at least one embodiment, not only does the control system determineand predict the corrosion in the aqueous phase of a crude unit overheadsystem but it can also calculate and predict the formation of salts aswell as their impact of corrosion. In at least one embodiment, theanalyzer can calculate in real time the amount of additive (amine) toinject to remedy the impact of salts on corrosion.

In at least one embodiment this calculation is achieved by using atleast one of the following inputs: pH, chloride, temperature, pressure,density, flowrate, wash water rate, total steam, and the presence of thefollowing compounds: Chloride, total amine, total nitrogen, halogen,bromide, iodide, oxygen, water, and ammonia level. In at least oneembodiment this is accomplished by the addition of and observation ofthe reaction of one or more of the following amines: methylamine,dimethylamine, trimethylamine, ethylamine, diethylamine, triethylamine,n-propylamine, isopropylamine, di-n-propylamine, di-isopropylamine,n-butylamine, sec-butylamine, 1-amino-2,2-dimethylpropane,2-amino-2-methylbutane, 2-aminopentane, 3-aminopentane, morpholine,monoethanolamine, ethylenediamine, propylenediamine,N,N-dimethylethanolamine, N,N-diethylethanolamine,N,N-dimethylisopropanolamine, Methoxyethylamine, Piperidine, Piperazine,Cyclohexylamine, N-methylethanolamine, N-propylethanolamine,N-ethylethanolamine, N,N-dimethylaminoethoxyethanol,N,N-diethylaminoethoxyethanol, N-methyldiethanolamine,N-propyldiethanolamine, N-ethyldiethanolamine, t-butylethanolamine,t-butyldiethanolamine, 2-(2-aminoethoxy)ethanol, di-n-butylamine,tri-n-butylamine, di-iso-butylamine, ethyl-n-butylamine, pentylamine,2-amino-2,3-dimethylbutane, 3-amino-2,2-dimethylbutane,2-amino-1-methoxypropane, dipropylamine, monoamylamine, n-butylamine,isobutylamine, 3-amino-1-methoxypropane, and any combination thereof.

Using sensors to detect pH, Chloride, Fe, as well as at least onenitrogen sensor, at least one total nitrogen sensor or the combinationthereof, a mathematical model can calculate the formation of salt and orcorrosive species. This information and the corresponding calculationscan be made in real time from a sample collected in real time. Thecalculated and stored information can then be used to calculate andcontrol the addition of additives in real time into the overhead basedon the corrosive nature and composition of the compounds present in theoverhead.

In at least one embodiment the control system can continuouslyrecalculate in real time the corrosive conditions; the salt formationand have the controller add appropriate additives should anyone-parameter change. These additives include but are not limited to:Water, Sodium Hydroxide, potassium hydroxide, lithium hydroxide,methylamine, dimethylamine, trimethylamine, ethylamine, diethylamine,triethylamine, n-propylamine, isopropylamine, di-n-propylamine,di-isopropylamine, n-butylamine, sec-butylamine,1-amino-2,2-dimethylpropane, 2-amino-2-methylbutane, 2-aminopentane,3-aminopentane, morpholine, monoethanolamine, ethylenediamine,propylenediamine, N,N-dimethylethanolamine, N,N-diethylethanolamine,N,N-dimethylisopropanolamine, Methoxyethylamine, Piperidine, Piperazine,Cyclohexylamine, N-methylethanolamine, N-propylethanolamine,N-ethylethanolamine, N,N-dimethylaminoethoxyethanol,N,N-diethylaminoethoxyethanol, N-methyldiethanolamine,N-propyldiethanolamine, N-ethyldiethanolamine, t-butylethanolamine,t-butyldiethanolamine, 2-(2-aminoethoxy)ethanol, di-n-butylamine,tri-n-butylamine, di-iso-butylamine, ethyl-n-butylamine, pentylamine,2-amino-2,3-dimethylbutane, 3-amino-2,2-dimethylbutane,2-amino-1-methoxypropane, dipropylamine, monoamylamine, n-butylamine,isobutylamine, 3-amino-1-methoxypropane, and any combination thereof.

In at least one embodiment the control system can detect through the useof sensors the corrosion resulting from aqueous fluids or the formationof salt compounds. These sensors are pH, Chloride, Fe, Nitrogen, totalnitrogen, ammonia, electrical resistance corrosion probes. In additionto measuring the corrosive environment these sensors provide input intothe analyzer facilitating the calculation of appropriate amounts ofchemical additives.

While this invention may be embodied in many different forms, theredescribed in detail herein specific preferred embodiments of theinvention. The present disclosure is an exemplification of theprinciples of the invention and is not intended to limit the inventionto the particular embodiments illustrated. All patents, patentapplications, scientific papers, and any other referenced materialsmentioned herein are incorporated by reference in their entirety.Furthermore, the invention encompasses any possible combination of someor all of the various embodiments described herein and/or incorporatedherein. In addition the invention encompasses any possible combinationthat also specifically excludes any one or some of the variousembodiments described herein and/or incorporated herein.

The above disclosure is intended to be illustrative and not exhaustive.This description will suggest many variations and alternatives to one ofordinary skill in this art. The compositions and methods disclosedherein may comprise, consist of, or consist essentially of the listedcomponents, or steps. As used herein the term “comprising” means“including, but not limited to”. As used herein the term “consistingessentially of” refers to a composition or method that includes thedisclosed components or steps, and any other components or steps that donot materially affect the novel and basic characteristics of thecompositions or methods. For example, compositions that consistessentially of listed ingredients do not contain additional ingredientsthat would affect the properties of those compositions. Those familiarwith the art may recognize other equivalents to the specific embodimentsdescribed herein which equivalents are also intended to be encompassedby the claims.

All ranges and parameters disclosed herein are understood to encompassany and all subranges subsumed therein, and every number between theendpoints. For example, a stated range of “1 to 10” should be consideredto include any and all subranges between (and inclusive of) the minimumvalue of 1 and the maximum value of 10; that is, all subranges beginningwith a minimum value of 1 or more, (e.g. 1 to 6.1), and ending with amaximum value of 10 or less, (e.g. 2.3 to 9.4, 3 to 8, 4 to 7), andfinally to each number 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 containedwithin the range.

All numeric values are herein assumed to be modified by the term“about,” whether or not explicitly indicated. The term “about” generallyrefers to a range of numbers that one of skill in the art would considerequivalent to the recited value (i.e., having the same function orresult). In many instances, the term “about” may include numbers thatare rounded to the nearest significant figure. Weight percent, percentby weight, % by weight, wt %, and the like are synonyms that refer tothe concentration of a substance as the weight of that substance dividedby the weight of the composition and multiplied by 100.

As used in this specification and the appended claims, the singularforms “a,” “an,” and “the” include plural referents unless the contentclearly dictates otherwise. Thus, for example, reference to acomposition containing “a compound” includes a mixture of two or morecompounds. As used in this specification and the appended claims, theterm “or” is generally employed in its sense including “and/or” unlessthe content clearly dictates otherwise.

This completes the description of the preferred and alternateembodiments of the invention. Those skilled in the art may recognizeother equivalents to the specific embodiment described herein whichequivalents are intended to be encompassed by the claims attachedhereto.

What is claimed is:
 1. A method of controlling corrosion rate of a crudeoil refinery process comprising: measuring iron or copper concentrationof the crude oil refinery process to establish an initial corrosion rateof the crude oil refinery process; measuring pH of the crude oilrefinery process; measuring chloride concentration of the crude oilrefinery process; measuring at least one of nitrogen, total nitrogen, orammonia concentration of the crude oil refinery process; altering theinitial corrosion rate of the crude oil refinery process according tothe measured pH, the measured chloride concentration, and the measuredat least one of nitrogen, total nitrogen, or ammonia concentration, andcorrecting for dynamic state error, thereby determining an alteredcorrosion rate; comparing the altered corrosion rate to a pre-determinedrange of acceptable values; and if the altered corrosion rate is outsideof the pre-determined range of acceptable values, performing a remedialmeasure to change the altered corrosion rate to a value within the rangeof acceptable values.
 2. The method of claim 1, wherein the remedialmeasure comprises adding to the crude oil refinery process a chemicalselected from a neutralizer, a caustic agent, a filming inhibitor, or acombination thereof.
 3. The method of claim 1, wherein the remedialmeasure comprises adding a neutralizer to the crude oil refineryprocess.
 4. The method of claim 3, wherein the neutralizer is selectedfrom 3-methoxypropylamine, monoethanolamine, N,N-dimethylaminoethanol,methoxyisopropylarnine, or a combination thereof.
 5. The method of claim1, wherein the remedial measure comprises adding a caustic agent to thecrude oil refinery process.
 6. The method of claim 1, wherein theremedial measure comprises adding a filming inhibitor to the crude oilrefinery process.
 7. The method of claim 6, wherein the filminginhibitor is selected from an oil soluble blend of amides, an oilsoluble blend of imidazolines, or a combination thereof.
 8. The methodof claim 1, wherein the altering step comprises performing a regressionanalysis to determine the altered corrosion rate.
 9. The method of claim1, wherein iron concentration is measured.
 10. The method of claim 1,wherein copper concentration is measured.
 11. The method of claim 1,wherein nitrogen concentration is measured.
 12. The method of claim 1,wherein total nitrogen concentration is measured.
 13. The method ofclaim 1, wherein ammonia concentration is measured.